package com.multiple.sources.core.servie.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.multiple.sources.core.bean.TenantDataSource;
import com.multiple.sources.core.mapper.TenantDataSourceMapper;
import com.multiple.sources.core.servie.api.ITenantDataSourceService;

/**
 * <p>
 * 租户数据源  服务实现类
 * </p>
 *
 * @author limao
 * @since 2017-08-31
 */
@Service
public class TenantDataSourceServiceImpl  implements ITenantDataSourceService {
	@Autowired
	private TenantDataSourceMapper tenantDataSourceMapper;

	@Override
	public int deleteByPrimaryKey(long tenantId) {
		// TODO Auto-generated method stub
		return tenantDataSourceMapper.deleteByPrimaryKey(tenantId);
	}

	@Override
	public int insert(TenantDataSource record) {
		// TODO Auto-generated method stub
		return tenantDataSourceMapper.insert(record);
	}

	@Override
	public int insertSelective(TenantDataSource record) {
		// TODO Auto-generated method stub
		return tenantDataSourceMapper.insertSelective(record);
	}

	@Override
	public TenantDataSource selectByPrimaryKey(long tenantId) {
		// TODO Auto-generated method stub
		return tenantDataSourceMapper.selectByPrimaryKey(tenantId);
	}

	@Override
	public int updateByPrimaryKeySelective(TenantDataSource record) {
		// TODO Auto-generated method stub
		return tenantDataSourceMapper.updateByPrimaryKeySelective(record);
	}

	@Override
	public int updateByPrimaryKey(TenantDataSource record) {
		// TODO Auto-generated method stub
		return tenantDataSourceMapper.updateByPrimaryKey(record);
	}
	
}
